const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
    app.use(
        '/api',
        createProxyMiddleware({
            target: 'http://182.92.156.207:8080/',
            changeOrigin: true,
            secure: false,
            pathRewrite: {
                "^/api": "",
            },
        })
    );
    app.use(
        '/newapi',
        createProxyMiddleware({
            target: 'http://123.57.67.148:3000/',
            changeOrigin: true,
            secure: false,
            pathRewrite: {
                "^/newapi": "",
            },
        })
    );
};